package config;

import org.springframework.context.support.ClassPathXmlApplicationContext;

public class App {
	
	public static Object getBean(String beanName){
		return Constant.AppContext.getBean(beanName);
	}
	
	public static void init(String xml){
		if(Constant.AppContext==null){
			Constant.AppContext = new ClassPathXmlApplicationContext(
			        new String[] {xml});
		}
	}
	public static void init(String[] xmls){
		if(Constant.AppContext==null){
			Constant.AppContext = new ClassPathXmlApplicationContext(
					xmls);
		}
	}
}
